package com.yewen.websocket.handler;

import com.yewen.websocket.message.Message;

import javax.websocket.Session;

/**
 * @Classname MessageHandler
 * @Description 消息处理接口
 * @Date 2022/3/25 16:01
 * @Created by TaoVh
 */
public interface MessageHandler<T extends Message> {
    /**
     * @Description 处理对应消息
     * @Author Taovh
     * @Date 2022/3/26 19:48
     * @param session 会话
     * @param message 消息
     * @return void
     **/
    void execute(Session session, T message);

    /*返回对应的消息类型*/
    String getType();
}
